﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Detail.aspx.cs" Inherits="Liguo.Store.Detail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>商品详情</title>
    <link rel="stylesheet" href="../css/cart.css" />
    <link rel="stylesheet" href="../css/store.css" />
    <script src="../js/artDialog/artDialog.js?skin=simple"></script>
    <script type="text/javascript">
        var goods = new Array(<%=goodsinfo%>);
    </script>
    <style type="text/css">
        .bottom {
            width: 100%;
            height: 40px;
            position: absolute;
            top: 750px;
        }

        .big_block {
            position: absolute;
            top: 140px;
            left: 0px;
            right: 80px;
            height: 600px;
        }

        .auto-style1 {
            width: 142px;
        }

        .auto-style10 {
            height: 20px;
            width: 1067px;
        }

        #menu {
            width: 360px;
            background: #ccc;
            font: bold 14px 宋体;
            border-width: 1px;
            border-style: solid;
        }

        #menu1 {
            background: #ccc;
            border-width: 1px;
            border-style: solid;
            padding: 3px 3px 3px 3px;
        }

        .backcolor {
            font-size: 22px;
            font-family: 宋体;
        }

        .title {
            font: bold 20px 宋体;
        }

        .auto-style13 {
            width: 93px;
        }

        .auto-style15 {
            width: 416px;
        }

        .btncart {
            border-style: none;
            border-color: inherit;
            border-width: medium;
            font-size: 22px;
            font-family: SimHei;
            color: #FFFFFF;
            background: #E4393C;
            margin: 0;
        }

        .lstyle {
            color: #FFFFFF;
            background: #E4393C;
        }

        li {
            color: #FFFFFF;
            background: #E4393C;
            font-size: 28px;
            font-family: 隶书;
        }

        .auto-style21 {
            width: 130px;
        }

        .auto-style26 {
            width: 525px;
        }

        .auto-style28 {
            width: 247px;
        }

        .auto-style29 {
            width: 250px;
        }

        .goods_img {
            width: 330px;
            height: 330px;
        }

        .pricecolor {
            color: #E4393C;
            font-weight: 900;
        }

        .auto-style30 {
            width: 212px;
        }

        .auto-style31 {
            width: 425px;
        }

        .auto-style32 {
            height: 20px;
            width: 425px;
        }

        .goods_amount {
            height: 24px;
            width: 80px;
            font-size: 18px;
            border: 1px solid;
            border-color: #808080;
            border-radius: 2px;
            text-align:center;
        }
    </style>
</head>
<body>
    <div style="height: 40px; width: 100%">
        <iframe src="Top.aspx"></iframe>
    </div>
    <div class="big_box">
        <div>
            <div class="logo">
                <a href="Store.aspx" target="_top">
                    <asp:Image ID="ImLogo" runat="server" ImageUrl="../res/Logo.png" />
                </a>
            </div>
            <div>
                <div class="search">
                    <form id="frmSearch" action="Display.aspx" method="post">
                        <input type="text" id="keyword" name="keyword" class="search_text" />
                        <input type="submit" id="btSearch" value="搜索" class="search_button" onclick="submitSearch();" />
                    </form>
                </div>
            </div>
        </div>
        <div class="big_block">
            <div class="navigation">
                <!--兼容IE早期版本的做法，不用在意-->
                <iframe src="Navigation.aspx#Menu=ChildMenu" frameborder="no" border="no"></iframe>
            </div>
            <div class="detail">
                <form id="form1" runat="server">
                    <table>
                        <tr bgcolor="#F2F1D7">
                            <td class="title" align="center" colspan="5">

                                <li>商品详情</li>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td rowspan="7" class="auto-style31">
                                <div style="width: 350px; height: 350px" id="menu1">
                                    <asp:Image ID="Image1" runat="server" CssClass="goods_img" Width="100%" Height="100%" />
                                </div>
                            </td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">

                                <asp:Label ID="Goodsname" runat="server" Text="名称：" CssClass="backcolor"></asp:Label>

                            </td>
                            <td class="auto-style15">

                                <asp:Label ID="Goodsnamevalue" runat="server" Text="Label"></asp:Label>

                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">

                                <asp:Label ID="Price" runat="server" Text="价格:" CssClass="backcolor"></asp:Label>

                            </td>
                            <td class="auto-style15">

                                <asp:Label ID="Pricevalue" runat="server" Text="Label" CssClass="pricecolor"></asp:Label>

                                <asp:Label ID="value2" runat="server" Text="Label"></asp:Label>

                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">

                                <asp:Label ID="Storge" runat="server" Text="库存:" CssClass="backcolor"></asp:Label>

                            </td>
                            <td class="auto-style15">

                                <asp:Label ID="Storgevalue" runat="server" Text="Label"></asp:Label>

                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">

                                <asp:Label ID="Sales" runat="server" Text="月销量:" CssClass="backcolor"></asp:Label>

                            </td>
                            <td class="auto-style15">

                                <asp:Label ID="SalesValue" runat="server" Text="Label"></asp:Label>

                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">

                                <asp:Label ID="Manu" runat="server" Text="厂家:" CssClass="backcolor"></asp:Label>

                            </td>
                            <td class="auto-style15">

                                <asp:Label ID="Manufacturers" runat="server" Text="Label"></asp:Label>

                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">

                                <asp:Label ID="Guarante" runat="server" Text="保质期:" CssClass="backcolor"></asp:Label>
                            </td>
                            <td class="auto-style15">
                                <asp:Label ID="GuaranteePeriod" runat="server" Text="Label"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style30"></td>
                            <td class="auto-style13">
                                <asp:Label ID="goodsweight" runat="server" Text="重量:" CssClass="backcolor"></asp:Label>
                            </td>
                            <td class="auto-style15">
                                <asp:Label ID="Weight" runat="server" Text="Label"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style31">
                                <asp:Label ID="GoodsIntroduce" runat="server" Text="商品简介" CssClass="backcolor"></asp:Label>
                            </td>
                            <td class="auto-style30"></td>
                            <td colspan="2">
                                <asp:Label ID="AMOUNT" runat="server" Text="购买重量:" CssClass="backcolor"></asp:Label>
                                <asp:Label ID="WEIGHT1" runat="server" Text="购买件数:" CssClass="backcolor"></asp:Label>
                                <asp:TextBox ID="value" runat="server" Width="60px" CssClass="goods_amount"></asp:TextBox>
                                <%--<asp:RegularExpressionValidator ID="EXP1" runat="server" ControlToValidate="value"  ValidationExpression="^\d{0,2}$"  ErrorMessage="请正确输入"   Display="Dynamic"   ForeColor="Red"></asp:RegularExpressionValidator>--%>
                                <asp:Label ID="value1" runat="server" Text="Label"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style1"></td>
                            <td class="auto-style31">
                                <div style="height: 75px" id="menu">
                                    <asp:Label ID="GoodsIntroduceValue" runat="server" Text="label"></asp:Label>
                            </td>
                            <td class="auto-style30"></td>
                            <td colspan="2">
                                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="加入购物车" CssClass="btncart" Width="141px" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
    <div class="bottom">
        <!--兼容IE早期版本的做法，不用在意-->
        <iframe src="Bottom.aspx" frameborder="no" border="no"></iframe>
    </div>
    <div class="cart">
        <div class="cart_info">
            <img class="cart_icon" src="../res/cart.png" />
            <span class="cart_name">购物车</span>
            <span class="cart_rmb">￥</span>
            <script>
                document.write("<ul>");
                var count = goods.length;
                var price = 0.0;
                if (count > 0) {
                    for (i = 0; i < count; i++) {
                        price += goods[i].price;
                        document.write("<li><a href=\"Detail.aspx?ID=" + goods[i].id + "\" class=\"a_img\"><img class=\"goods_img\" src=\"../images/" + goods[i].img + ".png\" /></a>");
                        document.write("<span class=\"goods_num\">×" + goods[i].num + "</span>");
                        document.write("<a href=\"Detail.aspx?ID=" + goods[i].id + "\" class=\"goods_name\">" + goods[i].name + "</a>");
                        if (goods[i].method == 0 || goods[i].method == 2) {
                            document.write("<span class=\"goods_price\" src=\"../res/del.png\">￥" + goods[i].price + "</span></li>");
                        }
                        else {
                            document.write("<span class=\"goods_price\" src=\"../res/del.png\">待定</span></li>");
                        }
                    }
                } else {
                    document.write("<li><span id=\"cart_none\">购物车为空</span></li>");
                }
                document.write("</ul>");
                document.write("<span class=\"cart_mon\">" + price.toFixed(2) + "</span>");
            </script>
        </div>
        <a class="cart_pay" href="Cart.aspx"><span>结算</span></a>
    </div>
</body>
</html>
